import React,{ useRef } from 'react'

export default function UseRef() {
    const inputRef = useRef()
  return (
    <div>
      <input ref={inputRef} type="text" />
      <button onClick={() => console.log(inputRef.current.value)}>Focus</button>
    </div> 
  )
}
